Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Adding personal access token (PAT) authentication in Jira reader #416

Closed
wants to merge 1 commit into from

Conversation

jinjintonic
Copy link

Jira reader uses misleading constructor argument name "api_token" but uses it as user password in basic auth. This change set renames email -> username, api_token -> password, as well as adds personal access token (PAT) option to be able to provide access to Jira instance without exposing user credentials.

Copy link
Collaborator

@jerryjliu jerryjliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, one nit

def __init__(self, email: str, api_token: str, server_url: str) -> None:
def __init__(
self,
username: str = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typing should be Optional[str] = None

@EmanuelCampos
Copy link
Collaborator

EmanuelCampos commented Sep 21, 2023

bump @jinjintonic - can you fix the typing as mentioned above?

@EmanuelCampos
Copy link
Collaborator

They accept username and password but accept email and the api_token as well

I would prefer to not give the option to use username and password since api_token is very easy to use

We can follow up with email, api_token, and add the personal access token as well (even not sure if it has a difference from api_token, I think not)

@EmanuelCampos
Copy link
Collaborator

Closing this PR now due to inactivity as well, a merge with the main will be necessary, feel free to reopen

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants